<?php
/**
 * CreateUser: zlh
 * CreateTime: 2022/2/22 14:40
 * Remark:
 */

namespace App\Http\Requests\CreditProject;

use App\Http\Requests\BaseRequests;

class AddCreditProjectPost extends BaseRequests
{

    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'credit_project_name' => "required",
            'credit_contract_total_money' => "required",
            'credit_quota' => "required",
            'client_id' => "required",
            'credit_period' => "required",
        ];
    }

    public function messages()
    {
        return [
            'client_id.required' => "客户不能为空",
            'credit_project_name.required' => "信用项目名称不能为空",
            'credit_contract_total_money.required' => "信用项目合同总金额不能为空",
            'credit_quota.required' => "信用额度不能为空",
            'credit_period.required' => "信用周期不能为空",
        ];
    }
}